import { Component, OnInit } from '@angular/core';
import { MenusService } from '../menus.services.component';


@Component({
    selector: 'nav-menu',
    templateUrl: './navMenu.component.html',
    styleUrls: ['./navMenu.component.less']
})

export class NavMenuComponent implements OnInit {
    menus: any;

    constructor(private menusService: MenusService) {
    }

    ngOnInit() {
        this.menus = this.menusService.curMenus;
        this.menusService.menusChanged.subscribe(menus => {
            this.menus = menus;
        });
    }
}
